<include file="App/Home/View/Public/header.html"/>
<style type="text/css">
	.td_wid1{ width: 100px !important; }
	.td_wid2{ width: 300px !important; }
	.td_wid3{ width: 90px !important; }
	.name{ color: #5f6468; }
	.mumber{ line-height: 25px; }
</style>
	<!--左侧导航 end-->	
	<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main">			
		<div class="row">
			<ol class="breadcrumb">
				<li class="active position_tit">市场信息<span style=" padding:0px 5px;">/</span>推荐结构</li>
			</ol>
		</div><!--/.row-->
		<div class="row">
			<div class="col-lg-12">
				<div class="panel panel-default">
					<div class="panel-heading">推荐结构</div>
					<div class="panel-body">
						<table class="table_all">
						    <thead>
						    <!-- <form action="{:U('ModifyMember/Member_tuijian')}" method="post">
						      <tr>
						        <th class="col-lg-2" style=" text-align:center;">查询会员：</th>
                                <th class="col-lg-3"><input style="width: 90% !important;" type="text" name="username" class="form-control" Placeholder=""></th>
                                <th class="col-lg-1"><input style=" margin-left:20px; width: 70px;" class="yz_btn" type="submit" value="搜索"></th>
                                <th class="col-lg-6"></th>
                              </tr>
                              </form> -->
						    </thead>
						</table>
						<a href="">全部关闭</a><br><br>
						 <ul>
							<li>
								<span><i class="icon-folder-open"></i></span><span class="name">当前用户名:{$user.username}</span><span></span>
								
								<ul>
						        	<foreach name='down' item='v'>
									<li class="mumber">
										<span  style="cursor:pointer" onclick="getUser($(this))" ><i class="icon-minus-sign" ></i><span class="name">{$v.username}</span><span></span></span> 
									</li>
						            </foreach>
								</ul>
							</li>
						</ul>
						<!-- 显示下线 -->
						<script>
							function getUser(jiedian){
									$.post("/Home/ModifyMember/Member_tuijian_ajax",{"username":jiedian.find(".name").html()},function(data){
									if(data.status==1){
										// 获取父类  ul
										jiedian=jiedian.parent();
											// 找到ul标签  移除
											jiedian.find('ul').remove();
											// 在给每个ul标签插入内容
											jiedian.append("<ul></ul>");
											for(var i=0;i<data.list.length;i++){
											jiedian.find("ul").append("<li class='mumber' style='margin-left:"+data.list.length*10+"px;'><img class='line' src='__PUBLIC__/Home/images/line.png'></img>&nbsp;<span onclick='getUser($(this))'><i class='icon-minus-sign'></i><span class='name'>"+data['list'][i]['username']+"</span></span><span></span></li>");
											}
										}else{
											alert("没有下线会员");
										}
									})

							}
						</script>
					</div>
				</div>
			</div>
		</div><!--/.row-->
        		
		
	</div>	<!--/.main-->	


</html>
